package com.xia.controller;

import com.xia.service.UserService;
import com.xia.utils.Result;
import org.apache.catalina.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;

@Controller
@RequestMapping("/user")
public class UserController {

    @Resource
    private UserService userService;

    @GetMapping({"","/index"})
    public String index() {
        return "user_list";
    }

    @PostMapping("/addEdit")
    public Result addEditUser(User user) {
        return Result.ok();
    }

}
